import { request } from '@/utils/request.js'

/**
 * 通知日志 API JS
 */

export default {

  /**
   * 获取通知日志分页列表
   * @returns
   */
  getList (params = {}) {
    return request({
      url: 'equipment/noticeservicesLog/index',
      method: 'get',
      params
    })
  },

  /**
   * 添加通知日志
   * @returns
   */
  save (data = {}) {
    return request({
      url: 'equipment/noticeservicesLog/save',
      method: 'post',
      data
    })
  },

  /**
   * 更新通知日志数据
   * @returns
   */
  update (id, data = {}) {
    return request({
      url: 'equipment/noticeservicesLog/update/' + id,
      method: 'put',
      data
    })
  },

  /**
   * 读取通知日志
   * @returns
   */
  read (id) {
    return request({
      url: 'equipment/noticeservicesLog/read/' + id,
      method: 'get',
      data
    })
  },

  /**
   * 将通知日志删除，有软删除则移动到回收站
   * @returns
   */
  deletes (data) {
    return request({
      url: 'equipment/noticeservicesLog/delete',
      method: 'delete',
      data
    })
  },

  /**
   * 从回收站获取通知日志数据列表
   * @returns
   */
  getRecycleList (params = {}) {
    return request({
      url: 'equipment/noticeservicesLog/recycle',
      method: 'get',
      params
    })
  },

  /**
   * 恢复通知日志数据
   * @returns
   */
  recoverys (data) {
    return request({
      url: 'equipment/noticeservicesLog/recovery',
      method: 'put',
      data
    })
  },

  /**
   * 真实删除通知日志
   * @returns
   */
  realDeletes (data) {
    return request({
      url: 'equipment/noticeservicesLog/realDelete',
      method: 'delete',
      data
    })
  },

  /**
   * 更改通知日志数据
   * @returns
   */
  changeStatus (data = {}) {
    return request({
      url: 'equipment/noticeservicesLog/changeStatus',
      method: 'put',
      data
    })
  },

  /**
   * 修改通知日志数值数据，自增自减
   * @returns
   */
  numberOperation (data = {}) {
    return request({
      url: 'equipment/noticeservicesLog/numberOperation',
      method: 'put',
      data
    })
  },

  /**
    * 通知日志导入
    * @returns
    */
  importExcel (data = {}) {
    return request({
      url: 'equipment/noticeservicesLog/import',
      method: 'post',
      data
    })
  },

  /**
   * 通知日志下载模板
   * @returns
   */
  downloadTemplate () {
    return request({
      url: 'equipment/noticeservicesLog/downloadTemplate',
      method: 'post',
      responseType: 'blob'
    })
  },

  /**
   * 通知日志导出
   * @returns
   */
  exportExcel (params = {}) {
    return request({
      url: 'equipment/noticeservicesLog/export',
      method: 'post',
      responseType: 'blob',
      params
    })
  },


}